﻿@model Projectmanagement.Entity.Task

@{
    ViewBag.Title = "Edit";
}
@using Projectmanagement.Entity
@using  Projectmanagement.Utl
<h2>Edit</h2>

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>Task</legend>

        
        <div class="editor-label">
            @Html.LabelFor(model => model.Name )
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Name)
            @Html.ValidationMessageFor(model => model.Name)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.KMLinks)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.KMLinks)
            @Html.ValidationMessageFor(model => model.KMLinks)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Deliverables)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Deliverables)
            @Html.ValidationMessageFor(model => model.Deliverables)
        </div>

        <div class="editor-label">
             @Model.Project.ProjectCode
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.ProjectID)
            @Html.ValidationMessageFor(model => model.ProjectID)
        </div>

        <div class="editor-label">
            @Model.Milestone.MilestoneName
        </div>
        <div class="editor-field">
            @Html.DropDownListFor(model => model.MilestoneID, new SelectList(CH.GetAllDatas<Milestone>().Where(w=>w.Projectid == Model.ProjectID), "ID", "MilestoneName"), "-请选择-")
            @Html.ValidationMessageFor(model => model.MilestoneID)
        </div>
           <p>
            <input type="submit" value="Save" />
        </p>
        <div class="editor-label">
            @Html.LabelFor(model => model.Name)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Name)
            @Html.ValidationMessageFor(model => model.Name)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Content)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Content)
            @Html.ValidationMessageFor(model => model.Content)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Notify)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Notify)
            @Html.ValidationMessageFor(model => model.Notify)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.StartDate)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.StartDate)
            @Html.ValidationMessageFor(model => model.StartDate)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.EndDate)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.EndDate)
            @Html.ValidationMessageFor(model => model.EndDate)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Owners)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Owners)
            @Html.ValidationMessageFor(model => model.Owners)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.TaskStateID)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.TaskStateID)
            @Html.ValidationMessageFor(model => model.TaskStateID)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.FinishDate)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.FinishDate)
            @Html.ValidationMessageFor(model => model.FinishDate)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Assinger)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Assinger)
            @Html.ValidationMessageFor(model => model.Assinger)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.TaskCode)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.TaskCode)
            @Html.ValidationMessageFor(model => model.TaskCode)
        </div>

        @Html.HiddenFor(model => model.ID)

        <div class="editor-label">
            @Html.LabelFor(model => model.Description)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Description)
            @Html.ValidationMessageFor(model => model.Description)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Sequence)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Sequence)
            @Html.ValidationMessageFor(model => model.Sequence)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.ModifiedUser)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.ModifiedUser)
            @Html.ValidationMessageFor(model => model.ModifiedUser)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.ModifiedDate)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.ModifiedDate)
            @Html.ValidationMessageFor(model => model.ModifiedDate)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Creator)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Creator)
            @Html.ValidationMessageFor(model => model.Creator)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.CreatedDate)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.CreatedDate)
            @Html.ValidationMessageFor(model => model.CreatedDate)
        </div>

     
    </fieldset>
}

<div>
    @Html.ActionLink("Back to List", "Index")
</div>
